package spbsu;


public class Subject {
    private String name;
    private Teacher teacher;
    private static int nextid = 1;
    private int id;

    public Subject (String name, Teacher teacher)
    {
        this.name = name;
        this.teacher = teacher;
        id = nextid++;
    }

    public int getId ()
    {
        return id;
    }

    public String getName ()
    {
        return name;
    }

    public Teacher getTeacher ()
    {
        return teacher;
    }

}
